package spike.postagger;
import java.io.IOException;
 
import edu.stanford.nlp.tagger.maxent.MaxentTagger;
  
public class TagText {
    public static void main(String[] args) throws IOException,
            ClassNotFoundException {
 
        // Initialize the tagger
        MaxentTagger tagger = new MaxentTagger(
                "models/left3words-wsj-0-18.tagger");
 
        // The sample string
        String sample = "I'm better than you. He is worse than you. This is not a sample text. It haven't. It shouldn't be easy. I don't agree with it. I don't know nothing";
 
        // The tagged string
        String tagged = tagger.tagString(sample);
 
        // Output the result
        System.out.println(tagged);
        
    }
}